<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@include file="/resources/common/commonTaglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- 导入资源文件 -->
<%@include file="/resources/common/commonJs.jsp" %>
<%@include file="/resources/common/commonCss.jsp" %>
<style type="text/css">
.addTable{
	line-height: 30px;
	border:solid 1px #cbcbcb; /* 设置边框属性；样式(solid=实线)、颜色(#999=灰) */
	text-align: center;
}
.addTable td{
	border:solid 1px #cbcbcb;
	text-align: center;
	letter-spacing:2px;
	width: 10%;
}
</style>
<title>教师详情</title>
<script type="text/javascript">
function update() {
	$('#saveForm').submit();
}

$(function() {
	$(".form-date").datetimepicker(	{
	    language:  "zh-CN",
	    weekStart: 1,
	    todayBtn:  1,
	    autoclose: 1,
	    todayHighlight: 1,
	    startView: 2,
	    minView: 2,
	    forceParse: 0,
	    format: "yyyy-mm-dd"
	});
})
</script>
</head>
<body>
<form action="${path }/user/studentAdd" id="saveForm">
<div class="panel panel-info" style="margin-top: 5px; margin-left: 2%; width: 96%">
	<input type="hidden" name="id" value="${sessionUser.id }"/>
	<div class="panel-heading">
		教师信息详情
	</div>
	<div class="panel-body">
		<table class="addTable">
			<tr>
				<td>姓名</td>
				<td><input type="text" name="name" value="${sessionUser.name }" class="form-control"/></td>
				<td>编号</td>
				<td><input type="text" name="userNo" value="${sessionUser.userNo }" class="form-control"/></td>
			</tr>
			<tr>
				<td>性别</td>
				<td>
					<select class="form-control" name="sex">
						<option value="1" <c:if test="${sessionUser.sex == '1' }">selected</c:if>>男</option>
						<option value="0" <c:if test="${sessionUser.sex == '0' }">selected</c:if>>女</option>
					</select>
				</td>
				<td>生日</td>
				<td><input type="text" name="birthDay" value="<fmt:formatDate value="${sessionUser.birthDay }" pattern="yyyy-MM-dd"/>" class="form-control form-date"/></td>
			</tr>
			<tr>
				<td>院系</td>
				<td><input type="text" name="deptName" value="${sessionUser.deptName }" class="form-control"/></td>
				<td>专业</td>
				<td><input type="text" name="majorName" value="${sessionUser.majorName }" class="form-control"/></td>
			</tr>
			<tr>
				<td>录入时间</td>
				<td><input type="text" value="<fmt:formatDate value="${sessionUser.createDate }" pattern="yyyy-MM-dd"/>" class="form-control" disabled/></td>
				<td>用户类型</td>
				<td><input type="text" value="${sessionUser.userType == 1 ? '学生' : (sessionUser.userType == 2 ? '教师' : '管理员') }" class="form-control" disabled/></td>
			</tr>
			<tr>
				<!-- <td colspan="4">
					<button class="btn btn-primary" onclick="update()">修改</button>
					<button class="btn">返回</button>
				</td> -->
			</tr>
		</table>
	</div>
</div>
</form>
</body>
</html>